<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;

/**
 * @property integer $id ID(主键)
 * @property integer $user_id 用户id
 * @property string $fcm_token 用户设备token
 * @property integer $exp_time 更新时间
 * @property string $device_id 设备id
 * @property string $device_model 设备型号
 * @property integer $created_at 创建时间
 * @property integer $updated_at 更新时间
 */
class AcUserFcmToken extends BaseApi
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'ac_user_fcm_token';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';

    /**
     * 获取器 image
     * @param $value
     * @return mixed|string
     */
    public function getExpTimeAttribute($value)
    {
        if (!empty($value)) {
            $value = date('Y-m-d H:i:s', $value);
        } else {
            $value = '';
        }
        return $value;
    }

}
